
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>demo</title>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="../js/jquery-ui-1.7.3.custom.css" type="text/css" />
<script src="../js/jquery.js" type="text/javascript"></script>
<script src="../js/jquery.ui.core.js" type="text/javascript"></script>
<script src="../js/jquery.ui.datepicker.js" type="text/javascript"></script>
<script src="../jlib/windows/jdialog.js" type="text/javascript"></script><SCRIPT LANGUAGE="JavaScript">
<!--
$(function(){
	$("#more_search").click(function(){
		$(this).boxto({title:"查询", url: this.href,width:650, height:440, moveable:true});
		return false;
	});				
	$(".view").click(function(){
		$(this).boxto({title:"编辑", url: this.href,width:650, height:440, moveable:true});
		return false;
	});
	
	$("#date").datepicker({dateFormat:"yy-mm-dd"});
});
function sub(){
	if($("#sbids").val()==null || $("#sbids").val()==""){
		alert("请选择企业");
		return;
	}
	if($("#date").val()==null || $("#date").val()==""){
		alert("日期不能为空");
		return;
	}
	$("form").submit();
}
function closediv() {
	$.boxit.closeAll();
}
//-->
</SCRIPT>
</head>
<body>
<table width="99%" cellpadding="0" cellspacing="0" class="table" >
<form action="search.htm">
<input type="hidden" value="${sblx!''}" name="sblx">
  <tr>
    <th colspan="4">选择企业</th>
  </tr>
  <tr>
    <td width="17%" align="center" class="rowColor rowColorRight">选择企业</td>
    <td width="38%" style="height:100px" class="row rowLeft">
		<select name="sbids" id="sbids"><!-- multiple="multiple"-->
			<#list list as sb>
			<option value="${sb.sbid}" <#if sbids??><#list sbids as id><#if id=="${sb.sbid}">selected<#break></#if></#list></#if> >${map[sb.sbid]}</option>
			</#list>
		</select>
	</td>
	<td width="17%" align="center" class="rowColor rowColorRight">时间</td>
    <td width="38%" class="row rowLeft">
	<input type="text" name="date" id="date" value="${date!''}" readonly >
	</td>
  </tr>
</table>
<div class="btnDiv"><input name="button2" type="button"
	class="btn" id="button2" value="查 询" onclick="sub()"/> <input name="button"
	type="submit" class="btn btnSpaceLeft" id="button" value="清 空" /> </div>
</form>
<#if vos??>
<#assign vo1=vos?first >
<table id="result" width="99%" cellpadding="0" cellspacing="0" class="table" >
 <tr>
    <th colspan="<#if vo1??>${vo1.sbzbs?size+2}</#if>">报表</th>
  </tr>
  <tr value="">
    <td width="250"  class="gridSubTitle"> 点位名称</td>
    <td width="40"  class="gridSubTitle"> 监控日期</td>
    <#list vo1.sbzbs as sbzb>
    <td width="200"  class="gridSubTitle"> 
    	<table width="100%">
    		<#if sblx=="00">
    		<tr>
    			<td  colspan="3">${sbzb.zbmc}/${sbzb.sjdw}</td>
    		</tr>
    		<tr>
    			<td>最小值</td>
    			<td>平均值</td>
    			<td>最大值</td>
    		</tr>

    		<#elseif sblx=="01">
    		<tr>
    			<td >${sbzb.zbmc}</td>
    		</tr>
    		<tr>
    			<td>${sbzb.sjdw}</td>
    		</tr>
    		</#if>
    	</table>
    </td>
    </#list>
  </tr>
  <#list vos as vo>
  <tr class="row">
    <td class="gridCenter">${vo.qymc}</td>
    <td class="gridCenter">${vo.jkrq}</td>
    <#assign timeVOs= vo.timeVOs>
    
    <#if timeVOs?size &gt; 0 >
    <#assign timeVO=timeVOs?first>
    <#list timeVO.jkzbs as jkzb>
    <td class="gridCenter">
    	<#if sblx=="00">
    	<table width="100%">
    	
    		<tr>
    			<td>${jkzb.min}</td>
    			<td>${jkzb.avg}</td>
    			<td>${jkzb.max}</td>
    		</tr>
    	</table>
    	<#elseif sblx=="01">
    	${jkzb.avg}
    	</#if>
    </td>
    </#list>
    <#else>
    <#list vo1.sbzbs as sbzb>
    <td class="gridCenter">
    </td>
    </#list>
    </#if>
    <td class="gridCenter"></td>
  </tr>
  </#list>
</table>
</#if>
</body>
</html>
